package Artist;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import www.mvc.Action;
import www.mvc.ActionForward;
import www.utility.Utility;

public class ArtistReadAction implements Action {

    @Override
    public ActionForward execute(HttpServletRequest request,
            HttpServletResponse response) throws Throwable {
        
        ArtistMgr mgr = new ArtistMgr();
        ArtistDTO dto = new ArtistDTO();
        String word = Utility.checkNull((String)request.getAttribute("word"));
        int nowPage = (Integer)request.getAttribute("nowPage");
        int artist_no = Integer.parseInt(request.getParameter("art_no"));
                
        dto = mgr.artistRead(artist_no);

        request.setAttribute("read", dto);
        ActionForward forward = new ActionForward();
        forward.setRedirect(false);
        forward.setPath("/artistRead.tiles");
        
        return forward;
    }

}
